/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package animacion;

import java.util.LinkedList;

/**
 *
 * @author David
 */
public class salida {


   private int objetostotales;
   public LinkedList<objeto> C;
   public salida ()
    {
        
        C = new LinkedList();
        
        
    }
    public int Atendidos()
    {
      return  this.C.size();
    }
    public void agregar(objeto item)
    {
        
            C.add(item);
        
        
    }
    public synchronized objeto obtener ()
            
    {
        objeto temp = null;
        
        if(current()!=0)
        {
            temp = C.pop();
        }
        else
        {
            temp=null;
        }
        
        return temp;
    }

   
    public int getObjetostotales() {
        return objetostotales;
    }
    public synchronized int current()
    {
        int total = 0;
        
        total = C.size();
        
        return total;
    }
    
   
}
